const express = require('express');
const router = express.Router();
const questionController = require('../controllers/questionController');

// 问题相关路由
router.get('/', questionController.getAllQuestions);
router.get('/simplify',questionController.getAllQuestionsSimplify)
router.get('/:id', questionController.getQuestionById);
router.post('/', questionController.createQuestion);
router.put('/:id', questionController.updateQuestion);
router.delete('/:id', questionController.deleteQuestion);
router.get('/category/:categoryId', questionController.getQuestionsByCategory);
router.get('/user/:userId', questionController.getQuestionsByUser);

module.exports = router;
